#include "Heap.h"

int main()
{
	HP hp;
	HeapInit(&hp);

	int arr[] = { 5,8,4,3,1,9,7 };
	for (int i = 0; i < sizeof(arr)/sizeof(arr[0]); i++)
	{
		HeapPush(&hp, arr[i]);
	}
	HeapPrintf(&hp);

	int k = 5;
	while (!HeapEmpty(&hp) && k--)
	{
		printf("%d ", HeapTop(&hp));
		HeapPop(&hp);
	}

	HeapDestroy(&hp);
	return 0;
}